val testUrl = "http://movie.douban.com/tag/?view=cloud&retry=2&t=1"

def getRetryTimeFromUrl(url:String):Int = {

  val retryPattern = "(.*)retry=(\\d+)(.*)".r
  val retryMatches = retryPattern.findFirstIn(url)
  if(retryMatches.isDefined){
    val retryPattern(_,retry,_) = url
    retry.toInt
  }else{
    1
  }
}


println("==== "+getRetryTimeFromUrl(testUrl))
val t = "http://www.douban.com/tag/%E7%BA%A6%E7%BF%B0%E5%B0%BC%C2%B7%E5%BE%B7%E6%99%AE/movie?start=15"
val strs = t.split("\\?")
println("="+strs.length)